<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>反转数组</title>
<script>
   var arr = [10, 20, 30, 40, 50]; // 原始数组
   var newArr = []; // 翻转后的数组
   for (var i = 0; i < arr.length; i++) {
       newArr[i] = arr[arr.length - i - 1];
   }
   for (var i = 0; i < newArr.length; i++) {
      console.log(newArr[i])
   }
  </script>
 </head>
 <body>
  <h1>翻转数组</h1>
 </body>
</html>